/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class RotarySwitch {
    static categoryCode = '010010064';

    static categoryName = '旋钮开关';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return RotarySwitch.categoryCode;
    }

    get categoryName() {
        return RotarySwitch.categoryName;
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'ppAXp3cI',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'peHyXV0z',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default RotarySwitch;
